"""Configuration module for the survey generation system."""
import os
from pathlib import Path
from dotenv import load_dotenv

# Load environment variables
load_dotenv()


# API Keys and URLs

ZHIPUAI_API_KEY = os.getenv("ZHIPUAI_API_KEY")
RAG_SERVER_URL = os.getenv("RAG_SERVER_URL")

# Project paths
ROOT_DIR = Path(__file__).parent
OUTPUT_DIR = ROOT_DIR / "output"

# Create directories if they don't exist
for dir_path in [OUTPUT_DIR]:
    dir_path.mkdir(parents=True, exist_ok=True)

# Model configurations
# glm-4-air; glm-4-plus; glm-4-flash; glm-4-long
DEFAULT_MODEL = "glm-4-plus"
MAX_TOKENS = 8000
TEMPERATURE = 0.7

# RAG configurations
DEFAULT_TOP_K = 30
MAX_CHUNKS_PER_DOC = 10 